home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-22 | 6.1 KB | 164 lines | [TEXT/MPS ] |
- /*------------------------------------------------------------------------------
- *
- * Apple Macintosh Developer Technical Support
- *
- * Installer 3.2 sample: setting package order in Custom Installation
- *
- * File: CustomOrder.r - Rez Source
- *
- * by: Jon Zap
- *
- * Copyright © 1991 Apple Computer, Inc.
- * All rights reserved.
- *
- *------------------------------------------------------------------------------
- * This installation sample is intended to only demonstrate how to organize the
- * entries in your Custom Installation screen. All of the packages contain the
- * same infa to simplify the script. We are not recommending that you do this in
- * a real script. Points to notice: the ordering is equivalent to the order
- * in this file NOT on the resource ID number. To look at it in another way, the
- * ordering is the same as the REVERSE order that is seen when using resEdit.
- * This example also demonstrates a divider package, which is used to provide
- * you with the ability to group (or separate) packages in the list of packages
- * on the custom installation screen.
- *----------------------------------------------------------------------------*/
-
- #include "InstallerTypes.r"
-
- /* You can build and complete the script with the following lines:
- # Note: set up floppies with the appropriate names and contents before running scriptcheck
- # or set up folders with the same names and contents as the floppies
- # put these folders in the same folder as the script or at the root directory of same disk
-
- rez -o "CustomOrder" -t 'bjbc' -c 'bjbc' "CustomOrder.r"
- setfile -a i "CustomOrder" #mark Inited
- scriptcheck -p "CustomOrder"
- */
-
- /* put a 1 in the creation date field of source 'infs' to have ScriptCheck set date */
- #define kScriptCheckSetsDate 0x01
-
- /* Definitions for the file spec atoms (specifications for source and destination files) */
- #define fsSourceProgram 2000
- #define fsTargetProgram 2001
-
- /* This is the name of the source disk */
- #define ProgramDisk "Program Disk:"
-
- /* This is the target path for where we want to install the file. */
- #define TargetPath ":Installed Application:"
-
- /* Definition for the package. */
- #define pkTheProgram1 3000
- #define pkTheProgram2 3001
- #define pkTheProgram3 3002
- #define pkTheProgram4 3003
- #define pkDivider1 1
-
- /* Definition for the file atom */
- #define faProgram 4000
-
- /***************************** Package Resources ************************************************/
- resource 'inpk' (pkTheProgram1) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- removable, /* Package can be removed */
- dontForceRestart, /* installing an app doesnt require rebooting */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "First Package", { /* package name */
- 'infa', faProgram;
- }
- }
- };
-
- resource 'inpk' (pkTheProgram2) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- removable, /* Package can be removed */
- dontForceRestart, /* installing an app doesnt require rebooting */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "Second Package", { /* package name */
- 'infa', faProgram;
- }
- }
- };
-
- resource 'inpk' (pkDivider1) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- notRemovable, /* Package can't be removed */
- dontForceRestart, /* divider doesnt require rebooting */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "-", {' ', 0 } /* package name - divider */
- }
- };
-
- resource 'inpk' (pkTheProgram4) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- removable, /* Package can be removed */
- dontForceRestart, /* installing an app doesnt require rebooting */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "First Additional Package", { /* package name */
- 'infa', faProgram;
- }
- }
- };
- resource 'inpk' (pkTheProgram3) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- removable, /* Package can be removed */
- dontForceRestart, /* installing an app doesnt require rebooting */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "Second Additional Package", { /* package name */
- 'infa', faProgram;
- }
- }
- };
-
- /********************************************* File Specs ***************************************/
- /* Source File Specs */
- resource 'infs' (fsSourceProgram) {
- 'APPL', /* File Type */
- 'Arfz', /* Creator */
- kScriptCheckSetsDate, /* ScriptCheck will fill in the creation date */
- noSearchForFile, /* Do not search the source disk for the file */
- typeCrMustMatch, /* file type and creator on this file must match */
- ProgramDisk"TheProgram" /* Path to the file */
- };
-
- /* Target File Specs */
- resource 'infs' (fsTargetProgram) {
- 'APPL', /* File Type */
- 'Arfz', /* Creator */
- 0, /* not needed for target file spec */
- noSearchForFile, /* Do not search the target disk for the file */
- typeCrMustMatch, /* not needed for target file specs */
- TargetPath"TheProgram" /* installation Path */
- };
-
- /******************************************** File Atoms ************************************************/
- resource 'infa' (faProgram) {
- format0 {
- deleteWhenRemoving, /* Delete the file if remove (option-custom) is clicked */
- dontDeleteWhenInstalling, /* don't need to predelete the target before copying new one */
- copy, /* Copy the file to the destination */
- leaveAloneIfNewer, /* do not Install this version, if newer one exists */
- updateExisting, /* replace an existing copy, if mine is newer */
- copyIfNewOrUpdate, /* Copy whether the target file exists or not */
- rsrcFork, dataFork, /* Copy both forks of the file */
- fsTargetProgram, /* TARGET file spec */
- fsSourceProgram, /* SOURCE file spec */
- 0, /* atom size (filled in by ScriptCheck) */
- "" /* Atom Description (for a file Installer will use file name) */
- };
- };
-
-
-
-